import { createRouter, createWebHistory } from 'vue-router';
import UserLogin from '../components/UserLogin.vue';
import UserRegister from '../components/UserRegister.vue';
import UserIndex from '../components/UserIndex.vue';
import UserInfo  from '../components/UserInfo.vue';  
import UserOrder from '../components/UserOrder.vue';
import ClassOrder from '../components/ClassOrder.vue';
import AdminIndex from '../components/AdminIndex.vue';
import BookCreate from '../components/BookCreate.vue';
import AdminOrderView from '../components/AdminOrderView.vue';
import ClassManage from '../components/ClassManage.vue';
import MessageCenter from '../components/MessageCenter.vue';
import SuperAdmin from '../components/SuperAdmin.vue';



const routes = [
  {
    path: '/UserIndex',
    component: UserIndex
  },
  {
    path: '/',
    redirect: '/UserLogin' // 默认登录页面
  },
  {
    path: '/UserLogin',
    component: UserLogin
  },
  {
    path: '/UserRegister',
    component: UserRegister
  },
  
  {
    path: '/UserOrder',
    component: UserOrder
  },
  {
    path: '/ClassOrder',
    component: ClassOrder
  },
  {
    path: '/AdminIndex',
    component: AdminIndex
  },
  {
    path: '/UserInfo',
    component: UserInfo
  },
  {
    path:'/BookCreate',
    component: BookCreate
  },
  {
    path: '/AdminOrderView',
    component:AdminOrderView
  },
  {
    path:'/ClassManage',
    component: ClassManage
  },
  {
    path:'/MessageCenter',
    component: MessageCenter
  },
  {
    path:"/SuperAdmin",
    component: SuperAdmin
  }

];

const router = createRouter({
  history: createWebHistory(),
  routes
});

export default router;
